﻿Imports System.ComponentModel

Namespace FL_8x0.FL_800.View
    Public Class LeakTestWindow
        Public Sub New()

            ' 此调用是设计器所必需的。
            InitializeComponent()

            ' 在 InitializeComponent() 调用之后添加任何初始化。


        End Sub

        Private Sub RecordTable_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
            AddHandler DirectCast(RecordTable.Items, ICollectionView).CollectionChanged,
                AddressOf QueryBusinessLevelWindow_CollectionChanged
        End Sub

        Private Sub QueryBusinessLevelWindow_CollectionChanged(ByVal sender As Object,
                                                               ByVal e As Specialized.NotifyCollectionChangedEventArgs)
            If e.NewItems IsNot Nothing Then '新增数据时才出发滚动
                Me.RecordTable.ScrollIntoView(Me.RecordTable.Items(Me.RecordTable.Items.Count - 1))
            End If
        End Sub



    End Class
End Namespace


